package com.atguigu.behavior.interpretor;

import java.util.HashMap;

//变量解析器
public class VariableExpression extends Expression {
    private String key;
    VariableExpression(String key) {
        this.key = key;
    }


    @Override
    public int interpreter(HashMap<String, Integer> var) {
        return var.get(key); 
    }
}
